<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>退赔单明细</title>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/plugins/jQuery/themes/default/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/plugins/jQuery/themes/icon.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/plugins/jQuery/demo.css"/>
    	
	<script src="${pageContext.request.contextPath }/plugins/jQuery/jquery.min.js"></script>
	<script src="${pageContext.request.contextPath }/plugins/jQuery/jquery.easyui.min.js"></script>
	<script src="${pageContext.request.contextPath}/plugins/jQuery/easyui-lang-zh_CN.js"></script>
	<script src="${pageContext.request.contextPath }/admin/js/easyui_mergecell.js"></script>
	<script type="text/javascript">
	   var sn='${sn}';
	   $(function(){
			loadTable();
			
	    });
		
		function loadTable(){
	//		var sortFlag = false;
			$('#dg').datagrid({
				rownumbers:true,
				singleSelect:true,
		 		url:'${pageContext.request.contextPath }/admin/return/returnitemdetails',
		 		queryParams:{
		 			 sn:sn
		 		},
	    		columns:[[
	 				{field:'app_name',title:'SKU名称',align:'center',width:200},
	 				{field:'goods_price',title:'单价',align:'center',width:80},
	 				{field:'num',title:'退赔件数',align:'center',width:80},
	 				{field:'kind',title:'退赔类型',align:'center',width:100},
	 				{field:'question_kind',title:'问题',align:'center',width:100},
	 				{field:'amount',title:'退赔金额',align:'center',width:80},
	 				{field:'apply_time',title:'申请时间',align:'center',width:160},
	 				{field:'username',title:'退赔申请人',align:'center',width:100}
	    		   
	 			]],
				onLoadSuccess:function(data){  
			   //  	if(!sortFlag) $(this).datagrid("autoMergeCells",['goods_name']);
				}
			});
		}
		
		function findData(){
			loadTable();
		}
		
		function refresh(){
			loadTable();
		}
		
		function toExcel(){
			alert("功能正在开发中...");
	//		$('#ff').submit();
		}
		
		function closeTab(){
			parent.window.closeTab('退赔记录详情');
	//		$('#tabs').tabs('close','退赔记录详情');
		}
		
		function showImg(imgUrl){
			show(imgUrl,"查看退赔大图","icon-search");
		}
		
		function show(url,name){
			parent.window.addTab(name,url);
		}
		
		function show(url,name,icon){
			parent.window.addTab(name,url,icon);
		}
		
	</script>
	<style type="text/css">
		body{
		font-family:'微软雅黑';
		font-size:15px;}
	</style>
  </head>
  
  <body>
  	<div style="height:60px; line-height:60px; vertical-align:middle;">
  		<span style="margin:0px 12px;">客户姓名:</span><span style="color:green;margin:0px 12px;">${rec.cust_name }</span>  
       	<span style="margin:0px 12px;">手机号：</span><span style="color:green;margin:0px 12px;">${rec.mobile }</span>
       	<span style="margin:0px 12px;">所属服务站:</span><span style="color:green;margin:0px 12px;">${rec.station_name }</span>
       	<span style="margin:0px 12px;">退赔类型:</span><span style="color:green;margin:0px 12px;">${rec.kind }</span>
  	</div>
	<table id="dg" loadMsg="正在查询..." style="width:935px;height:auto;"></table>
	<div style="height:15px;">&nbsp;</div>
	<div style="height:30px; line-height:30px; vertical-align:middle; font-weight:bold; margin-left:12px;">退赔原因：</div>
	<div style="height:30px; line-height:30px; vertical-align:middle; margin-left:40px;">${rec.reason }</div>
	<div style="height:15px;">&nbsp;</div>
	<div style="height:30px; line-height:30px; vertical-align:middle; font-weight:bold; margin-left:12px;">退赔图片：</div>
	<div style="margin:10px 40px 10px 40px;">${rec.images }</div>
	<hr style="width:950px;" align="left"/>
	<div style="height:30px; line-height:30px; vertical-align:middle; font-weight:bold; margin-left:12px;">
		退赔合计金额：<span style="color:red;font-size:18px;">${rec.amount } 元</span> 
	</div>
	<div style="height:15px;">&nbsp;</div>
	<div style="height:30px; line-height:30px; vertical-align:middle; text-align:center; width:950px;">
		<a href="javascript:closeTab()" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" style="width:100px;margin:0px 3px;">关闭</a>
	</div>
  </body>
</html>
